<!DOCTYPE html>
<html>
<head>
    <title>午托饭-代码生成器</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/element.css">
    <script src="libs/jquery.min.js"></script>
    <script src="plugins/layer/layer.js"></script>
    <script src="libs/bootstrap.min.js"></script>
    <script src="libs/vue.min.js"></script>
    <script src="libs/element.js"></script>
    <script src="plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="js/common.js"></script>
</head>
<body>
<div id="rrapp">
    <div class="grid-btn">
        <div class="form-group col-sm-2">
            <input type="text" class="form-control" v-model="q.author" @keyup.enter="query" placeholder="作者">
        </div>
        <select class="btn btn-default" v-model="ds">
            <option disabled value="">请选择数据源</option>
            <option v-for="(item,index) in dsList" :key="index" :label="item" :value="item" ></option>
        </select>
        <a class="btn btn-default" @click="query">查询</a>
        <a class="btn btn-default" @click="clear">重置</a>
        <el-button class="btn btn-primary" type="primary" plain  @click="dialogVisible = true">创建模板配置</el-button>
        <el-dialog title="编辑模板" :visible.sync="dialogVisible" width="30%">
            <!--弹出的对话框的内容-->
            <el-form ref="form" :model="addDt" label-width="80px">
                <el-form-item label="数据源">
                    <el-select v-model="addDt.ds" clearable placeholder="请选择">
                        <el-option
                                v-for="(item,index) in dsList"
                                :key="index"
                                :label="item"
                                :value="item">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="模板名称">
                    <el-input v-model="addDt.name"></el-input>
                </el-form-item>
                <el-form-item label="包路径">
                    <el-input v-model="addDt.packageReference"></el-input>
                </el-form-item>
                <el-form-item label="模块目录">
                    <el-input v-model="addDt.moduleName"></el-input>
                </el-form-item>
                <el-form-item label="作者">
                    <el-input v-model="addDt.author"></el-input>
                </el-form-item>
                <el-form-item label="邮箱">
                    <el-input v-model="addDt.email"></el-input>
                </el-form-item>
                <el-form-item label="表前缀">
                    <el-input v-model="addDt.tablePrefix"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="createDt">立即创建</el-button>
                    <el-button @click="dialogVisible = false">取消</el-button>
                </el-form-item>
            </el-form>
        </el-dialog></a>
        <a class="btn btn-default" @click="del">删除</a>
    </div>
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>

</div>

<script src="js/template.js"></script>
</body>
</html>